<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>称号获得 - 荣誉系统</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
            background-attachment: fixed;
            color: #333;
            line-height: 1.6;
            min-height: 100vh;
            padding-bottom: 40px;
        }
        
        #header {
            background: rgba(255, 255, 255, 0.95);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            padding: 12px 16px;
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        .header_con {
            display: flex;
            align-items: center;
            max-width: 800px;
            margin: 0 auto;
        }
        
        .back-btn {
            display: flex;
            align-items: center;
            text-decoration: none;
            color: #2575fc;
            font-size: 16px;
            font-weight: 500;
            transition: all 0.3s ease;
            padding: 8px 12px;
            border-radius: 50px;
        }
        
        .back-btn:hover {
            background: rgba(37, 117, 252, 0.1);
            transform: translateX(-5px);
        }
        
        .back-btn:active {
            transform: translateX(-5px) scale(0.95);
        }
        
        .back-btn span {
            display: inline-block;
            margin-right: 6px;
            font-size: 20px;
            transition: all 0.3s ease;
        }
        
        .top_tit {
            flex: 1;
            text-align: center;
            font-size: 18px;
            font-weight: 600;
            color: #2c3e50;
        }
        
        .container {
            max-width: 800px;
            margin: 20px auto;
            padding: 0 16px;
        }
        
        .title-card {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 16px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
            overflow: hidden;
            margin-bottom: 25px;
            transform: translateY(20px);
            opacity: 0;
            animation: slideIn 0.6s ease-out forwards;
        }
        
        @keyframes slideIn {
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
        
        .card-header {
            background: linear-gradient(90deg, #ff7e5f, #feb47b);
            padding: 25px 20px;
            text-align: center;
            color: white;
            position: relative;
        }
        
        .card-header h2 {
            font-size: 28px;
            margin-bottom: 10px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }
        
        .current-title {
            font-size: 32px;
            font-weight: 700;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50px;
            padding: 10px 30px;
            display: inline-block;
            margin: 10px 0;
            min-width: 280px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }
        
        .title-label {
            font-size: 14px;
            opacity: 0.9;
            letter-spacing: 1px;
        }
        
        .card-body {
            padding: 30px 25px;
        }
        
        .section-title {
            font-size: 20px;
            color: #2575fc;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #f0f5ff;
            font-weight: 600;
            display: flex;
            align-items: center;
        }
        
        .section-title i {
            margin-right: 10px;
            background: linear-gradient(90deg, #2575fc, #6a11cb);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        
        .titles-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .title-item {
            background: white;
            border-radius: 12px;
            padding: 20px 15px;
            text-align: center;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            border: 2px solid #eaeaea;
        }
        
        .title-item.unlocked {
            border-color: #ff7e5f;
            box-shadow: 0 5px 15px rgba(255, 126, 95, 0.2);
        }
        
        .title-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }
        
        .title-icon {
            font-size: 40px;
            margin-bottom: 15px;
            background: linear-gradient(135deg, #2575fc, #6a11cb);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        
        .title-name {
            font-weight: 700;
            font-size: 18px;
            margin-bottom: 8px;
            color: #2c3e50;
        }
        
        .title-desc {
            font-size: 13px;
            color: #666;
            min-height: 40px;
        }
        
        .title-status {
            margin-top: 10px;
            font-size: 12px;
            padding: 4px 10px;
            border-radius: 20px;
            display: inline-block;
        }
        
        .status-unlocked {
            background: rgba(37, 117, 252, 0.1);
            color: #2575fc;
        }
        
        .status-locked {
            background: rgba(255, 126, 95, 0.1);
            color: #ff7e5f;
        }
        
        .progress-container {
            background: #f9f9ff;
            border-radius: 12px;
            padding: 20px;
            margin: 30px 0;
            border: 1px solid #eaeaff;
        }
        
        .progress-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
        }
        
        .next-title {
            font-weight: 600;
            color: #ff7e5f;
        }
        
        .progress-bar {
            height: 12px;
            background: #e0e0e0;
            border-radius: 10px;
            overflow: hidden;
            margin-top: 10px;
        }
        
        .progress {
            height: 100%;
            background: linear-gradient(90deg, #ff7e5f, #feb47b);
            border-radius: 10px;
            width: 65%;
            transition: width 1.5s ease;
        }
        
        .progress-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 5px;
            font-size: 12px;
            color: #666;
        }
        
        .rules-list {
            list-style: none;
            margin-top: 30px;
        }
        
        .rules-list li {
            padding: 12px 0 12px 35px;
            position: relative;
            border-bottom: 1px solid #f0f5ff;
        }
        
        .rules-list li:before {
            content: "•";
            color: #ff7e5f;
            font-size: 24px;
            position: absolute;
            left: 10px;
            top: 8px;
        }
        
        .action-buttons {
            display: flex;
            gap: 15px;
            margin-top: 30px;
        }
        
        .btn {
            flex: 1;
            padding: 16px;
            border: none;
            border-radius: 12px;
            font-weight: 600;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            text-decoration: none;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .btn-primary {
            background: linear-gradient(90deg, #2575fc, #6a11cb);
            color: white;
            box-shadow: 0 4px 15px rgba(37, 117, 252, 0.4);
        }
        
        .btn-secondary {
            background: white;
            color: #2575fc;
            border: 2px solid #2575fc;
        }
        
        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(37, 117, 252, 0.5);
        }
        
        .btn:active {
            transform: translateY(-1px);
        }
        
        .icon {
            margin-right: 8px;
            font-size: 18px;
        }
        
        .footer-note {
            text-align: center;
            color: rgba(255, 255, 255, 0.8);
            font-size: 13px;
            margin-top: 30px;
            padding: 0 20px;
        }
        
        .ribbon {
            position: absolute;
            top: -6px;
            right: -30px;
            padding: 6px 30px;
            transform: rotate(45deg);
            font-size: 12px;
            font-weight: bold;
            background: linear-gradient(90deg, #ff7e5f, #feb47b);
            color: white;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }
        
        /* 弹窗样式 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }
        
        .modal-content {
            background: white;
            border-radius: 20px;
            padding: 40px 30px;
            text-align: center;
            max-width: 90%;
            width: 400px;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
            animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            transform: scale(0.8);
            opacity: 0;
        }
        
        @keyframes popIn {
            to {
                transform: scale(1);
                opacity: 1;
            }
        }
        
        .modal-icon {
            font-size: 70px;
            margin-bottom: 20px;
            background: linear-gradient(135deg, #ff7e5f, #feb47b);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        
        .modal-title {
            font-size: 28px;
            margin-bottom: 15px;
            color: #2c3e50;
        }
        
        .modal-text {
            font-size: 18px;
            color: #555;
            margin-bottom: 25px;
            line-height: 1.5;
        }
        
        .modal-btn {
            padding: 14px 40px;
            background: linear-gradient(90deg, #2575fc, #6a11cb);
            color: white;
            border: none;
            border-radius: 50px;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 20px rgba(37, 117, 252, 0.4);
        }
        
        .modal-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(37, 117, 252, 0.5);
        }
        
        .modal-btn:active {
            transform: translateY(0);
        }
        
        @media (max-width: 768px) {
            .titles-container {
                grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            }
            
            .current-title {
                font-size: 26px;
                min-width: 240px;
                padding: 8px 20px;
            }
        }
        
        @media (max-width: 480px) {
            .titles-container {
                grid-template-columns: 1fr 1fr;
            }
            
            .action-buttons {
                flex-direction: column;
            }
            
            .current-title {
                font-size: 22px;
                min-width: 200px;
            }
            
            .card-header h2 {
                font-size: 24px;
            }
            
            .section-title {
                font-size: 18px;
            }
            
            .modal-content {
                width: 90%;
                padding: 30px 20px;
            }
            
            .modal-icon {
                font-size: 50px;
            }
            
            .modal-title {
                font-size: 24px;
            }
            
            .modal-text {
                font-size: 16px;
            }
        }
    </style>
</head>
<body>
    <header id="header">
        <div class="header_con">
            <a href="integral.html" class="back-btn" id="backBtn">
                <span>←</span> 返回
            </a> 
            <div class="top_tit">称号获得</div>
        </div>
    </header>
    
    <div class="container">
        <div class="title-card">
            <div class="card-header">
                <h2>我的当前称号</h2>
                <div class="current-title">知识探索者</div>
                <div class="title-label">继续努力，解锁更高级的称号！</div>
            </div>
            
            <div class="card-body">
                <h3 class="section-title">
                    <i class="fas fa-medal"></i>称号系统
                </h3>
                
                <div class="titles-container">
                    <div class="title-item unlocked">
                        <div class="ribbon">已获得</div>
                        <div class="title-icon"><i class="fas fa-seedling"></i></div>
                        <div class="title-name">学习新秀</div>
                        <div class="title-desc">完成10次学习任务</div>
                        <div class="title-status status-unlocked">已解锁</div>
                    </div>
                    
                    <div class="title-item unlocked">
                        <div class="title-icon"><i class="fas fa-book-reader"></i></div>
                        <div class="title-name">知识探索者</div>
                        <div class="title-desc">阅读50篇文章</div>
                        <div class="title-status status-unlocked">当前称号</div>
                    </div>
                    
                    <div class="title-item">
                        <div class="title-icon"><i class="fas fa-lightbulb"></i></div>
                        <div class="title-name">智慧之星</div>
                        <div class="title-desc">连续30天登录</div>
                        <div class="title-status status-locked">未解锁</div>
                    </div>
                    
                    <div class="title-item">
                        <div class="title-icon"><i class="fas fa-crown"></i></div>
                        <div class="title-name">学术大师</div>
                        <div class="title-desc">累计获得1000积分</div>
                        <div class="title-status status-locked">未解锁</div>
                    </div>
                    
                    <div class="title-item">
                        <div class="title-icon"><i class="fas fa-rocket"></i></div>
                        <div class="title-name">超级学霸</div>
                        <div class="title-desc">完成100次挑战</div>
                        <div class="title-status status-locked">未解锁</div>
                    </div>
                    
                    <div class="title-item">
                        <div class="title-icon"><i class="fas fa-gem"></i></div>
                        <div class="title-name">终身学者</div>
                        <div class="title-desc">坚持学习365天</div>
                        <div class="title-status status-locked">未解锁</div>
                    </div>
                </div>
                
                <div class="progress-container">
                    <div class="progress-header">
                        <span>升级进度</span>
                        <span class="next-title">下一级: 智慧之星</span>
                    </div>
                    <div class="progress-bar">
                        <div class="progress" id="progressBar"></div>
                    </div>
                    <div class="progress-labels">
                        <span>0</span>
                        <span>5天</span>
                        <span>15天</span>
                        <span>25天</span>
                        <span>30天</span>
                    </div>
                </div>
                
                <h3 class="section-title">
                    <i class="fas fa-info-circle"></i>称号规则
                </h3>
                
                <ul class="rules-list">
                    <li>称号系统根据您的学习成就自动解锁</li>
                    <li>每个称号都有独特的获取条件和专属权益</li>
                    <li>高级称号可解锁专属特权和学习资源</li>
                    <li>每月会推出限时活动称号，请及时关注</li>
                    <li>称号可随时在个人资料页切换展示</li>
                    <li>达到最高称号可获得实物奖励和荣誉称号</li>
                </ul>
                
                <div class="action-buttons">
                    <a href="#" class="btn btn-primary" id="claimBtn">
                        <span class="icon"><i class="fas fa-trophy"></i></span> 领取称号奖励
                    </a>
                    <a href="#" class="btn btn-secondary" id="shareBtn">
                        <span class="icon"><i class="fas fa-share-alt"></i></span> 分享成就
                    </a>
                </div>
            </div>
        </div>
    </div>
    
    <div class="footer-note">
        温馨提示：称号系统每月更新，请持续关注新称号获取方式
    </div>
    
    <!-- 弹窗区域 -->
    <div class="modal" id="successModal">
        <div class="modal-content">
            <div class="modal-icon"><i class="fas fa-check-circle"></i></div>
            <h2 class="modal-title">领取成功</h2>
            <p class="modal-text">恭喜您成功领取"知识探索者"称号奖励！<br>50积分已添加到您的账户。</p>
            <button class="modal-btn" id="closeModalBtn">确定</button>
        </div>
    </div>
    
    <div class="modal" id="shareModal">
        <div class="modal-content">
            <div class="modal-icon"><i class="fas fa-link"></i></div>
            <h2 class="modal-title">分享成功</h2>
            <p class="modal-text">成就分享链接已复制到剪贴板！<br>您可以将链接分享给朋友或社交媒体。</p>
            <button class="modal-btn" id="closeShareModalBtn">确定</button>
        </div>
    </div>

    <script>
        // 返回按钮功能实现
        document.getElementById('backBtn').addEventListener('click', function() {
            if (window.history.length > 1) {
                window.history.back();
            } else {
                window.location.href = 'index.html';
            }
        });
        
        // 添加动画效果
        document.addEventListener('DOMContentLoaded', function() {
            // 进度条动画
            setTimeout(() => {
                document.getElementById('progressBar').style.width = '65%';
            }, 500);
            
            // 称号项动画
            const titleItems = document.querySelectorAll('.title-item');
            titleItems.forEach((item, index) => {
                item.style.animationDelay = `${index * 0.1}s`;
                item.style.opacity = 0;
                item.style.transform = 'translateY(20px)';
                setTimeout(() => {
                    item.style.transition = 'all 0.5s ease';
                    item.style.opacity = 1;
                    item.style.transform = 'translateY(0)';
                }, 600 + index * 100);
            });
            
            // 按钮悬停效果增强
            const buttons = document.querySelectorAll('.btn');
            buttons.forEach(button => {
                button.addEventListener('mouseenter', function() {
                    this.style.transform = 'translateY(-5px)';
                });
                
                button.addEventListener('mouseleave', function() {
                    this.style.transform = 'translateY(0)';
                });
            });
            
            // 领取按钮事件
            document.getElementById('claimBtn').addEventListener('click', function(e) {
                e.preventDefault();
                document.getElementById('successModal').style.display = 'flex';
            });
            
            // 分享按钮事件
            document.getElementById('shareBtn').addEventListener('click', function(e) {
                e.preventDefault();
                // 模拟复制链接到剪贴板
                navigator.clipboard.writeText('https://example.com/achievements/12345')
                    .then(() => {
                        document.getElementById('shareModal').style.display = 'flex';
                    })
                    .catch(err => {
                        console.error('复制失败:', err);
                        document.getElementById('shareModal').style.display = 'flex';
                    });
            });
            
            // 关闭弹窗按钮
            document.getElementById('closeModalBtn').addEventListener('click', function() {
                document.getElementById('successModal').style.display = 'none';
            });
            
            document.getElementById('closeShareModalBtn').addEventListener('click', function() {
                document.getElementById('shareModal').style.display = 'none';
            });
            
            // 点击模态框背景关闭弹窗
            const modals = document.querySelectorAll('.modal');
            modals.forEach(modal => {
                modal.addEventListener('click', function(e) {
                    if (e.target === modal) {
                        modal.style.display = 'none';
                    }
                });
            });
        });
    </script>
</body>
</html>